package com.buba.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.buba.service.CodeRulesService;
import entity.system.CodeRules;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 编码规则信息表 前端控制器
 * </p>
 *
 * @author beisheng
 * @since 2023-05-18
 */
@RestController
@RequestMapping("/code-rules")
public class CodeRulesController {
    @Autowired
    private CodeRulesService codeRulesService;


    /* *
     * @Author: beisheng
     * @Descriprion: 根据规则名称查询规则详细信息
     * @Date: 2023/5/23 11:13
     * @Return: entity.system.CodeRules
     * @Param: [codeRule]
     */

    @GetMapping("/selAllRules")
    public CodeRules selAllRules(@RequestBody String codeRule){
        CodeRules one = codeRulesService.getOne(new QueryWrapper<CodeRules>().eq("delete_flag", 0).eq("prefix", codeRule));
        return one;
    }
}

